{% extends 'base.html' %}
{% block title %}我的借阅 - Local Library{% endblock %}
{% block content %}
    <h1>我借阅的图书</h1>
    {% if bookinstance_list %}
        <div class="cards-row" style="flex-wrap:wrap;gap:18px;">
        {% for bookinst in bookinstance_list %}
            <div class="info-card" style="min-width:220px;max-width:320px;flex:1 1 220px;">
                <div class="info-card-title">📖 {{ bookinst.book.title }}</div>
                <div class="info-item"><b>作者：</b>{{ bookinst.book.author }}</div>
                <div class="info-item"><b>借阅日期：</b>{{ bookinst.imprint }}</div>
                <div class="info-item"><b>到期日：</b>{{ bookinst.due_back }}</div>
                <div class="info-item"><b>是否逾期：</b>{% if bookinst.is_overdue %}<span style="color:red">是</span>{% else %}否{% endif %}</div>
                <div style="margin-top:10px;"><a href="{% url 'book-detail' bookinst.book.pk %}" class="btn" style="padding:6px 18px;font-size:0.98rem;">详情</a></div>
            </div>
        {% endfor %}
        </div>
    {% else %}
        <p>您当前没有借阅任何图书。</p>
    {% endif %}
{% endblock %} 